package com.probox.common.entity.service.customer;

import com.baomidou.mybatisplus.extension.service.IService;
import com.probox.common.entity.domain.customer.CustomerFundStore;
import com.probox.common.entity.vo.customer.CustomerFundStoreVo;
import com.probox.common.entity.vo.customer.StoreFundItem;
import com.probox.common.entity.vo.customerService.CustomerServiceBuyRecordVo;

import java.util.List;

/**
 * 客户资金Service接口
 *
 * @author usoft
 * @date 2022-10-06
 */
public interface ICustomerFundStoreService extends IService<CustomerFundStore> {

    /**
     * 增加/修改客户门店资金表
     * @param record
     */
    public void saveOrUpdateFundStore(CustomerServiceBuyRecordVo record);

    /**
     * 查询客户各个门店的资金信息
     *
     * @param customerUid
     * @return
     */
    public List<CustomerFundStoreVo> listFundStore(Long customerUid);

    public List<CustomerFundStoreVo> sumStoreFundList(Long storeId);

    public Integer listFundStoreTotal(Long customerUid);

    /**
     * 查询客户资金
     *
     * @param fundUid 客户资金ID
     * @return 客户资金
     */
    public CustomerFundStore selectCustomerFundStoreById(Long fundUid);

    public CustomerFundStore selectCustomerFund(Long storeId,Long customerId);


    /**
     * 查询客户资金列表
     *
     * @param customerFundStore 客户资金
     * @return 客户资金集合
     */
    public List<CustomerFundStore> queryList(CustomerFundStore customerFundStore);

    /**
     * 新增客户资金
     *
     * @param customerFundStore 客户资金
     * @return 结果
     */
    public boolean insertCustomerFundStore(CustomerFundStore customerFundStore);

    /**
     * 修改客户资金
     *
     * @param customerFundStore 客户资金
     * @return 结果
     */
    public boolean updateCustomerFundStore(CustomerFundStore customerFundStore);

    /**
     * 批量删除客户资金
     *
     * @param fundUids 需要删除的客户资金ID
     * @return 结果
     */
    public boolean deleteCustomerFundStoreByIds(Long[] fundUids);

    /**
     * 查询门店资金列表
     * @param customerId
     * @return
     */
    public List<StoreFundItem> getStoreFundByCustomerId(Long customerId);

    public List<CustomerFundStore> customerStoreFundList(Long storeId);

}
